<?php 
if(!isset($_SESSION)) 
{ 
	session_start(); 
}
$lang = $_SESSION['lang'];
if (empty($lang) || $lang == "EN") {
	include "../../value/value_en.php";
} else if($lang == "VN") {
	include "../../value/value_vn.php";
}
else {
	include "../../value/value_kr.php";
}
include '../../operations/connection.php';
if(isset($_REQUEST['idgen'])){
	$query="SELECT sa_general_allowance.is_status,sa_general_allowance.allowance_car,sa_general_allowance.allowance_hard,sa_general_allowance.allowance_holiday,sa_general_allowance.allowance_lunch,sa_general_allowance.allowance_overtime,sa_general_allowance.createDate,sa_general_allowance.number_max_holiday,sa_general_allowance.number_time_work,sa_general_allowance.time_last_update ,luem.FullName as lastuserupdate, crem.FullName as usercreate 
	from sa_general_allowance left JOIN employee crem on crem.IDEmployee=sa_general_allowance.user_create 
	left JOIN employee luem on luem.IDEmployee=sa_general_allowance.user_last_update 
	where sa_general_allowance.id=".$_REQUEST['idgen'];
	$kq=mysql_query($query);
	if(mysql_num_rows($kq)>0){
		while($row=mysql_fetch_array($kq)){
			$_REQUEST['number_time_work']=$row['number_time_work'];
			$_REQUEST['number_max_holiday']=$row['number_max_holiday'];
			$_REQUEST['allowance_holiday']=$row['allowance_holiday'];
			$_REQUEST['allowance_lunch']=$row['allowance_lunch'];
			$_REQUEST['allowance_car']=$row['allowance_car'];
			$_REQUEST['allowance_hard']=$row['allowance_hard'];
			$_REQUEST['allowance_overtime']=$row['allowance_overtime'];
			$_REQUEST["abc"]=$row['is_status'];
			$_REQUEST['user_create']=$row['usercreate'];
			$_REQUEST['first_create']=$row['createDate'];
			$_REQUEST['user_last_update']=$row['lastuserupdate'];
			$_REQUEST['time_last_update']=$row['time_last_update'];
		}
	}
}
?>
				<table style="border-bottom: 1px dotted silver; padding:10px 5px" width="100%">
					<tr>
						<td class="tdfirst" ><?php echo $l_number_time_work;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
						<td><input type="text" value="<?=$_REQUEST['number_time_work']?>" onkeypress="return enterTable(event,this.id);" onchange="checkname(this.value);" name="number_time_work" id="number_time_work"  class="in_testfield" style="width:516px" /></td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_number_max_holiday;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
					<td><input type="text" value="<?=$_REQUEST['number_max_holiday']?>" onkeypress="return enterTable(event,this.id);" name="number_max_holiday" id="number_max_holiday" class="in_testfield" style="width:516px" /></td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_allowance_holiday;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
					<td><input type="text" value="<?=number_format($_REQUEST['allowance_holiday'])?>" onkeypress="return enterTable(event,this.id);" id="allowance_holiday" name="allowance_holiday" class="in_testfield" style="width:516px" /> </td>
					</tr>
					<tr>
						<td class="tdfirst"><?php echo $l_allowance_lunch;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
						<td><input type="text" value="<?=number_format($_REQUEST['allowance_lunch'])?>" onkeypress="return enterTable(event,this.id);" onchange="checkname(this.value);" name="allowance_lunch" id="allowance_lunch"  class="in_testfield" style="width:516px" /></td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_allowance_car;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
					<td><input type="text" value="<?=number_format($_REQUEST['allowance_car'])?>" onkeypress="return enterTable(event,this.id);" name="allowance_car" id="allowance_car" class="in_testfield" style="width:516px" /></td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_allowance_hard;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
					<td><input type="text" value="<?=number_format($_REQUEST['allowance_hard'])?>" onkeypress="return enterTable(event,this.id);" id="allowance_hard" name="allowance_hard" class="in_testfield" style="width:516px" /> </td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_allowance_overtime;?>:<span style="color:red;font-weight: bold;float:right;">(*)</span></td>
					<td><input type="text" value="<?=number_format($_REQUEST['allowance_overtime'])?>" onkeypress="return enterTable(event,this.id);" id="allowance_overtime" name="allowance_overtime" class="in_testfield" style="width:516px" /> </td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_Activestatus;?>:</td>
					<td>
						<input type="radio"  id="abc" name="abc" value="1" <?php if ($_REQUEST["abc"]=="1") echo "checked";?> /> <?php echo $l_apdung;?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="abc" id="abc"  value="0" <?php if ($_REQUEST["abc"]=="0") echo "checked";?>/> <?php echo $l_status_saved;?>
					</td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_user_create;?>:</td>
					<td><input type="text" value="<?=$_REQUEST['user_create']?>" onkeypress="return enterTable(event,this.id);" id="user_create" name="user_create" class="in_testfield" style="width:516px;background: #d7d9dd;"  readonly="readonly" /> </td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_first_create;?>:</td>
					<td><input type="text" value="<?=$_REQUEST['first_create']?>" onkeypress="return enterTable(event,this.id);" id="first_create" name="first_create" class="in_testfield" style="width:516px;background: #d7d9dd;"  readonly="readonly" /> </td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_user_last_update;?>:</td>
					<td><input type="text" value="<?=$_REQUEST['user_last_update']?>" onkeypress="return enterTable(event,this.id);" id="user_last_update" name="user_last_update" class="in_testfield" style="width:516px;background: #d7d9dd;" readonly="readonly" /> </td>
					</tr>
					<tr>
					<td class="tdfirst"><?php echo $l_time_last_update;?>:</td>
					<td><input type="text" value="<?=$_REQUEST['time_last_update']?>" onkeypress="return enterTable(event,this.id);" id="time_last_update" name="time_last_update" class="in_testfield" style="width:516px;background: #d7d9dd;" readonly="readonly" /> </td>
					</tr>
				</table>
				<?php mysql_close($connection);?>